.class public Lrexsee/open/RexseeBaidu;
.super Ljava/lang/Object;
.source "RexseeBaidu.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;
.implements Lrexsee/open/OpenInterface;


# static fields
.field public static final EVENT_BAIDUREADY:Ljava/lang/String; = "onBaiduReady"

.field public static final INTERFACE_NAME:Ljava/lang/String; = "Baidu"

.field public static final STRING_NAME:Ljava/lang/String; = "\u767e\u5ea6"


# instance fields
.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private mKey:Ljava/lang/String;

.field private mSecret:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 7
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    const/4 v5, 0x0

    const-string v6, "string"

    .line 30
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 32
    iput-object p1, p0, Lrexsee/open/RexseeBaidu;->mBrowser:Lrexsee/core/browser/Browser;

    .line 35
    iget-object v3, p0, Lrexsee/open/RexseeBaidu;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v3, v3, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v4, "onBaiduReady"

    invoke-virtual {v3, v4}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 37
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    .line 38
    .local v2, "r":Landroid/content/res/Resources;
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    .line 39
    .local v1, "packageName":Ljava/lang/String;
    const-string v3, "BaiduKey"

    const-string v4, "string"

    invoke-virtual {v2, v3, v6, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 40
    .local v0, "id":I
    if-nez v0, :cond_0

    move-object v3, v5

    :goto_0
    iput-object v3, p0, Lrexsee/open/RexseeBaidu;->mKey:Ljava/lang/String;

    .line 41
    const-string v3, "BaiduSecret"

    const-string v4, "string"

    invoke-virtual {v2, v3, v6, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 42
    if-nez v0, :cond_1

    move-object v3, v5

    :goto_1
    iput-object v3, p0, Lrexsee/open/RexseeBaidu;->mSecret:Ljava/lang/String;

    .line 44
    return-void

    .line 40
    :cond_0
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto :goto_0

    .line 42
    :cond_1
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto :goto_1
.end method


# virtual methods
.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 16
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 12
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/open/RexseeBaidu;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Baidu"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getKeyAndSecret()Ljava/lang/String;
    .locals 2

    .prologue
    .line 56
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "{\"key\":\""

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lrexsee/open/RexseeBaidu;->mKey:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\",\"secret\":\""

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lrexsee/open/RexseeBaidu;->mSecret:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\"}"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 20
    new-instance v0, Lrexsee/open/RexseeBaidu;

    invoke-direct {v0, p1}, Lrexsee/open/RexseeBaidu;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public isReady()Z
    .locals 1

    .prologue
    .line 71
    const/4 v0, 0x0

    return v0
.end method

.method public login()V
    .locals 0

    .prologue
    .line 62
    return-void
.end method

.method public loginAndRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .param p1, "arguments"    # Ljava/lang/String;
    .param p2, "progressTitle"    # Ljava/lang/String;
    .param p3, "successMessage"    # Ljava/lang/String;

    .prologue
    .line 77
    return-void
.end method

.method public logout()V
    .locals 0

    .prologue
    .line 67
    return-void
.end method

.method public request(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .param p1, "arguments"    # Ljava/lang/String;
    .param p2, "progressTitle"    # Ljava/lang/String;

    .prologue
    .line 81
    const/4 v0, 0x0

    return-object v0
.end method

.method public setKeyAndSecret(Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .param p1, "key"    # Ljava/lang/String;
    .param p2, "secret"    # Ljava/lang/String;

    .prologue
    .line 51
    iput-object p1, p0, Lrexsee/open/RexseeBaidu;->mKey:Ljava/lang/String;

    .line 52
    iput-object p2, p0, Lrexsee/open/RexseeBaidu;->mSecret:Ljava/lang/String;

    .line 53
    return-void
.end method
